import request from '@/utils/request'

// 查询事件信息列表
export function listEvent(query) {
  return request({
    url: '/ptsj/event/list',
    method: 'get',
    params: query
  })
}

// 查询事件信息详细
export function getEvent(id) {
  return request({
    url: '/ptsj/event/' + id,
    method: 'get'
  })
}

// 新增事件信息
export function addEvent(data) {
  return request({
    url: '/ptsj/event',
    method: 'post',
    data: data
  })
}

// 问题流转新增
export function handleEvent(data) {
  return request({
    url: '/ptsj/event/handleEvent',
    method: 'post',
    headers: {
      isToken: true
    },
    data: data
  })
}

// 修改事件信息
export function updateEvent(data) {
  return request({
    url: '/ptsj/event',
    method: 'put',
    data: data
  })
}

// 删除事件信息
export function delEvent(id) {
  return request({
    url: '/ptsj/event/' + id,
    method: 'delete'
  })
}

// 批量导入事件
export function batchAddEvent(data) {
  return request({
    url: '/ptsj/event/batchAddEvent',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded', isToken: true },
    method: 'post',
    data: data
  })
}